package com.yueyang.sojourn.server.model.dto;

import com.yueyang.sojourn.server.model.enums.LayoutTypeEnum;
import com.yueyang.sojourn.server.validation.annotation.EnumValid;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;
import java.util.Map;

/**
 * @author yemingxing
 * @summary
 * @Copyright (c) 2020, Yueyang Group All Rights Reserved.
 * @since 2020-02-29 15:58
 */
@Data
@ApiModel("楼层模板DTO")
public class EditLayoutDto {

    /**
     * 主键id
     */
    @ApiModelProperty(value = "模板id", required = true)
    @NotNull(message = "[模板id]不能为空")
    private Integer id;

    /**
     * 标题
     */
    @ApiModelProperty("标题")
    @Size(max = 6, message = "[标题]最多支持6个字")
    @NotBlank(message = "[标题]不能为空")
    private String title;

    /**
     * 副标题
     */
    @ApiModelProperty("副标题")
    @Size(max = 10, message = "[副标题]最多支持10个字")
    @NotBlank(message = "[副标题]不能为空")
    private String subtitle;

    /**
     * 模板1：关联项目
     */
    @ApiModelProperty("模板1：关联项目")
    @Size(min = 4, max = 4, message = "[关联项目]须传4个关联项目id")
    private List<Long> projectIds;

    /**
     * 模板2：关联商品
     */
    @ApiModelProperty("模板2：关联商品")
    @Valid
    private List<EditMerchKindDto> merchKinds;
}